<?php
define('PAGE_NEED_PRI','UPLOAD_FILE');
session_start();
include("main.php");


$src = $_REQUEST['src'];
$des = $_REQUEST['des'];
$width = $_REQUEST['width'];
$height= $_REQUEST['height'];
$c_x = $_REQUEST['c_x'];
$c_y= $_REQUEST['c_y'];
$c_width = $_REQUEST['c_width'];
$c_height = $_REQUEST['c_height'];

$current_dir = dirname(dirname(__FILE__)).'/upfiles/';
$src = $current_dir.$src;
$des = $current_dir.$des;

$helper = new ImageThumnailHelper_Crop();
$helper->crop($src,$des,$width,$height,$c_x,$c_y,$c_width,$c_height);
?>